var myChart = echarts.init(document.getElementById('main'));
let xData = [];
let yData = [];
  
for(let i=0; i<=1; i+=0.1){
  xData.push(i);
  yData.push(i);
}

var option = {
  xAxis: {
    type: 'category',
    data: ['2000', '2005', '2010', '2015', '2020']
  },
  yAxis: {
    type: 'value'
  },
  series: [{
    type: 'line',
    data: [6, 9, 8, 8, 7]
  }]
};

myChart.setOption(option);